﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Vehicle/Vehicle.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="LOGISTCBUS.Entities" %>
<%@ Import Namespace="LOGISTCBUS.DAO" %>
<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" src="<%= Url.Content("~/Scripts/App/vehicleEdit.js") %>"></script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <strong>CADASTRO DE VEÍCULO</strong>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%
        var v = this.ViewData["vehicle"] != null ? (Vehicle)this.ViewData["vehicle"] : new Vehicle();
    %>
    <div class="box">
        <div class="tabs">
            <ul>
                <li class="titleBox" style="padding: 3px 0 6px 10px;">Preencha os campos abaixo:</li>
            </ul>
            <div style="padding: 20px;" align="center">
                <div class="box" style="width: 500px;">
                    <div class="tabs">
                        <div style="padding: 10px;">
                            <input type="hidden" id="hdfIdVehicle" value="<%= v.Id %>" />
                            <table border="0" align="center" cellpadding="0" cellspacing="5" class="texto10azulclaro">
                                <tr>
                                    <td colspan="3" align="center">
                                        <p style='color: red; font-weight: bold;' id="lblMessage">
                                            <%= ViewData["error"] %>
                                        </p>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="23" align="right">
                                        Placa:
                                    </td>
                                    <td>
                                        <input type="text" name="txtNumberPlate" id="txtNumberPlate" class="fForm required"
                                            maxlength="8" style="width: 200px;" tabindex="1" value="<%= v.NumberPlate %>" />
                                    </td>
                                </tr>
                                <tr>
                                    <td height="23" align="right">
                                        Ano:
                                    </td>
                                    <td>
                                        <input type="text" name="txtYear" id="txtYear" class="fForm required" maxlength="4"
                                            style="width: 200px;" tabindex="2" value="<%= v.Year > 0 ? v.Year.ToString() : string.Empty %>" />
                                    </td>
                                </tr>
                                <tr>
                                    <td height="23" align="right">
                                        Marca:
                                    </td>
                                    <td>
                                        <input type="text" name="txtMark" id="txtMark" class="fForm required" maxlength="100"
                                            style="width: 200px;" tabindex="2" value="<%= v.Mark %>" />
                                    </td>
                                </tr>
                                <tr>
                                    <td height="23" align="right">
                                        Modelo:
                                    </td>
                                    <td>
                                        <input type="text" name="txtModel" id="txtModel" class="fForm required" maxlength="100"
                                            style="width: 200px;" tabindex="2" value="<%= v.Model %>" />
                                    </td>
                                </tr>
                                <tr>
                                    <td height="23" align="right" valign="middle">
                                        Descrição:
                                    </td>
                                    <td>
                                        <textarea id="txtDescription" rows="3" cols="100" class="fForm" style="width: 200px;
                                            height: 100px;" maxlength="500" tabindex="6"><%= v.Description %></textarea>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
                <div style="padding-top: 10px;">
                    <input name="btnSave" id="btnSave" type="button" value="Inserir" class="ui-button ui-state-default ui-corner-all botaoS" />
                </div>
            </div>
        </div>
    </div>
    <div align="center" class="texto10azulclaro" style="padding-top: 15px;">
        © 2012 - Todos os direitos reservados.
    </div>
</asp:Content>
